package com.hzdl.hotel.service.impl;

import com.hzdl.hotel.bean.RoomBook;
import com.hzdl.hotel.mapper.RoomBookMapper;
import com.hzdl.hotel.service.RoomBookService;
import com.hzdl.hotel.vo.RoomBookVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomBookServiceImpl implements RoomBookService {

    @Autowired
    private RoomBookMapper roomBookMapper;

    @Override
    public int addRoomBook(RoomBook roomBook) {
        return roomBookMapper.addRoomBook(roomBook);
    }

    @Override
    public int updateRoomRenting(String hId) {
        return roomBookMapper.updateRoomRenting(hId);
    }

    @Override
    public List<RoomBook> findAll(Integer userId) {
        return roomBookMapper.findAll(userId);
    }

    @Override
    public int delOrder(String chkId) {
        return roomBookMapper.delOrder(chkId);
    }

    @Override
    public int updateOrder(RoomBook roomBook) {
        return roomBookMapper.updateOrder(roomBook);
    }

    @Override
    public RoomBook findBycheckId(String checkId) {
        return roomBookMapper.findBycheckId(checkId);
    }
}
